<template>
	<view class="my-container">
		<!-- 登录组件 没有token -->
		<my-login v-if="!token"></my-login>
		<!-- 个人信息 有token -->
		<my-userinfo v-else></my-userinfo>
	</view>
</template>

<script>
	import badge from '@/mixins/badge.js'
	import MyLogin from "@/components/my-login.vue";
	import MyUserinfo from "@/components/my-userinfo.vue";
	import { mapState } from 'vuex'
	export default {
		mixins: [badge], 
		computed: {
			...mapState('user', ['token'])
		}, 
		components: {
			MyLogin,
			MyUserinfo
		},
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
page, .my-container {
  height: 100%;
}
</style>
